(*
CS520 Project
William Blair

Scheduling Interface

*)

#define ATS_STALOADFLAG 0 //no need for staloading at run-time

abst@ype schedule (a:t@ype)

abst@ype event

abst@ype timestamp

fun schedule_init(schedule: &schedule(event)? >> schedule(event)) : void

fun schedule_run(schedule: schedule(event)) : void

fun schedule_event(schedule: !schedule(event), e: event) : void

fun schedule_next_event(schedule: !schedule(event), e: &event? >> event ): bool

fun schedule_run_event(schedule: !schedule(event), e:event) : void

fun{a:t@ype} schedule_free(schedule:schedule(a)) : void

fun schedule_sleep_until(time: timestamp) : void

fun schedule_current_time () : timestamp

fun event_timestamp(e: !event) : timestamp